<script language="javascript">
	function back(){
		document.location="<?php echo site_url(); ?>/master_kelas";
	}
</script>
<?php
echo form_open("/master_kelas/form_kelas/".$parameter, array("name"=>"form_kelas","id"=>"medic_form"));
if($parameter == FALSE){
	$nama_kelas	= set_value("nama_kelas");
	$program	= set_value("program");
	$jurusan	= set_value("jurusan");
	$status		= set_value("status");
} else {
	$nama_kelas	= $value["NAMA_KELAS"];
	$program	= $value["ID_PROGRAM"];
	$jurusan	= $value["ID_JURUSAN"];
	$status		= $value["STATUS"];
}
?>
<p>
	<label>Nama Kelas</label>
	<input type="text" name="nama_kelas" value="<?php echo $nama_kelas; ?>">
	<?php echo form_error("nama_kelas"); ?>
</p>
<p>
	<label>Program Pendidikan</label>
	<select name="program">
		<option value="">-- Pilih Program Pendidikan --</option>
		<?php
		foreach($qprogram as $row){
		?>
		<option value="<?php echo $row["ID_PROGRAM"]; ?>" <?php echo ($program == $row["ID_PROGRAM"]) ? ("selected") : (""); ?>><?php echo $row["NAMA_PROGRAM"]; ?></option>
		<?php
		}
		?>
	</select>
	<?php echo form_error("program");?>
</p>
<p>
	<label>Jurusan</label>
	<select name="jurusan">
		<option value="">-- Pilih Jurusan --</option>
		<?php
		foreach($qjurusan as $row){
		?>
		<option value="<?php echo $row["ID_JURUSAN"]; ?>" <?php echo ($jurusan== $row["ID_JURUSAN"]) ? ("selected") : (""); ?>><?php echo $row["NAMA_JURUSAN"]; ?></option>
		<?php
		}
		?>
	</select>
	<?php echo form_error("jurusan");?>
</p>
<p>
	<label>Status</label>
	<select name="status">
		<option value="">-- Pilih Status --</option>
		<option value="1" <?php echo ($status == 1) ? ("selected") : (""); ?>>Aktif</option>
		<option value="2" <?php echo ($status == 2) ? ("selected") : (""); ?>>Tidak Aktif</option>
	</select>
	<?php echo form_error("status"); ?>
</p>
<p>
	<input type="submit" class="btn btn-primary" id="submit" value="Simpan">
	<input type="reset" class="btn btn-primary" id="submit" value="Reset">
	<input type="button" class="btn btn-primary" id="submit" value="Kembali" onClick="back()">
</p>
<?php echo form_close(); ?>